import requests

# 登录 URL 和数据
LOGIN_URL = "https://www.mtesifyme.com/api/v1/pwd_login"
login_data = {
    "login_pdw": "asd1234567",
    "phone": "17050611266",
    "sign": "F7FFA3C43DC670EE08FEA930F93E5236",
    "timestamp": 1703657157
}
token= "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cubXRlc2lmeW1lLmNvbSIsImF1ZCI6Ind3dy5tdGVzaWZ5bWUuY29tIiwiaWF0IjoxNzAzNjYxOTE2LCJuYmYiOjE3MDM2NjE5MTYsImV4cCI6MTcwNjI1MzkxNiwianRpIjp7InBob25lIjoiMTcwNTA2MTEyNjYiLCJ0eXBlIjoiYXBwIn19.9sMqyxdOXoWmIlR2uaTxbA5SmjDBB_fhWlkvPbCKqho";
headers = {}
headers = {'Authori-Zation': token}  # 使用正确的字段名称
# 使用 cookie 发送 GET 请求
GET_URL = "https://www.mtesifyme.com/api/v1/user/sign"
response = requests.get(GET_URL,  headers=headers)
print(response.text)
# 发送 POST 请求进行登录
# response = requests.post(LOGIN_URL, data=login_data)
# print(response.text)
# 检查是否登录成功
# if response.status_code == 200:
#     # 尝试从响应体中获取 token
#     token = response.json()["data"]["token"]
#     print('token:',token)
#     # 设置请求头，包含 token
#     headers = {}
#     if token:
#         # 设置请求头，包含 token
#         headers = {'Authori-Zation': token}  # 使用正确的字段名称
#         print('token:', token)
#     # 使用 cookie 发送 GET 请求
#     GET_URL = "https://www.mtesifyme.com/api/v1/user/sign"
#     response = requests.get(GET_URL,  headers=headers)

    # 打印 GET 请求的响应内容
#     print(response.text)
# else:
#     print("登录失败，状态码：", response.status_code)
